package demo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Test0 {

    public static void main(String[] args) {

        System.out.println("这是一个test类");

        Integer[] intArray = { 1, 2, 3, 4, 5 };

        Double[] doubleArray = { 1.1, 2.2, 3.3, 4.4 };

        Character[] charArray = { 'H', 'E', 'L', 'L', 'O' };

        /*System.out.println( "整型数组元素为:" );
        printArray( intArray  ); // 传递一个整型数组


        System.out.println( "\n双精度型数组元素为:" );
        printArray( doubleArray ); // 传递一个双精度型数组*/

        //Integer 区间 [-128,127]
        Integer x = 128;
        Integer y = 128;
//        System.out.println( x==y );  //false

//        System.out.println( Math.sin(Math.PI/2));  //false


        Integer i = 10;
//        System.out.println( i.longValue());

        String j = "wbz";

        char[] arr = {'3','5','6','7','w'};

        String s = new String(arr);

        s = s+"ccc";

//        System.out.println(s);
        float floatVar = 3.14f;

        int intVal = 3;


//        System.out.printf("浮点数变量值为：%f,"+ "整数变量值为： %d", floatVar, intVal);

        //或者
//        System.out.println( String.format("浮点数变量值为：%f,"+ "整数变量值为： %d", floatVar, intVal));




    }


    public static <T> void printArray(T[] inputArr) {

        for (T element: inputArr) {
            System.out.printf( "%s ", element );
        }

        System.out.println();
    }






}
